function Employee(jsonObject) {
	this.internalObject = jsonObject;
}

Employee.prototype = {
	getAddress: function() { return this.internalObject.Address; },
	setAddress: function(address) { this.internalObject.Address = address; },
	getBirthDate: function() { return this.internalObject.BirthDate; },
	setBirthDate: function(birthdate) { this.internalObject.BirthDate = birthdate; },
	getCity: function() { return this.internalObject.City; },
	setCity: function(city) { this.internalObject.City = city; },
	getCountry: function() { return this.internalObject.Country; },
	setCountry: function(country) { this.internalObject.Country = country; },
	getEmployeeId: function() { return this.internalObject.EmployeeId; },
	getExtension: function() { return this.internalObject.Extension; },
	setExtension: function(extension) { this.internalObject.Extension = extension; },
	getFirstName: function() { return this.internalObject.FirstName; },
	setFirstName: function(firstname) { this.internalObject.FirstName = firstname; },
	getHireDate: function() { return this.internalObject.HireDate; },
	setHireDate: function(hiredate) { this.internalObject.HireDate = hiredate; },
	getHomePhone: function() { return this.internalObject.HomePhone; },
	setHomePhone: function(homephone) { this.internalObject.HomePhone = homephone; },
	getLastName: function() { return this.internalObject.LastName; },
	setLastName: function(lastname) { this.internalObject.LastName = lastname; },
	getNotes: function() { return this.internalObject.Notes; },
	setNotes: function(notes) { this.internalObject.Notes = notes; },
	getPhoto: function() { return this.internalObject.Photo; },
	setPhoto: function(photo) { this.internalObject.Photo = photo; },
	getPhotoPath: function() { return this.internalObject.PhotoPath; },
	setPhotoPath: function(photopath) { this.internalObject.PhotoPath = photopath; },
	getPostalCode: function() { return this.internalObject.PostalCode; },
	setPostalCode: function(postalcode) { this.internalObject.PostalCode = postalcode; },
	getRegion: function() { return this.internalObject.Region; },
	setRegion: function(region) { this.internalObject.Region = region; },
	getReportsTo: function() { return this.internalObject.ReportsTo; },
	setReportsTo: function(reportsto) { this.internalObject.ReportsTo = reportsto; },
	getTitle: function() { return this.internalObject.Title; },
	setTitle: function(title) { this.internalObject.Title = title; },
	getTitleOfCourtesy: function() { return this.internalObject.TitleOfCourtesy; },
	setTitleOfCourtesy: function(titleofcourtesy) { this.internalObject.TitleOfCourtesy = titleofcourtesy; },
	getCreatedDate: function() { return this.internalObject.CreatedDate; },
	getCreatedBy: function() { return this.internalObject.CreatedBy; },
	getModifiedDate: function() { return this.internalObject.ModifiedDate; },
	getModifiedBy: function() { return this.internalObject.ModifiedBy; },
	getEmployeeObject: function() { return this.internalObject; }
};

function EmployeeService() {
}

EmployeeService.prototype.retrieveAll = function(successCallback) {
    viewServiceProxy.invokeGet("EmployeeList", successCallback, OnPageError, true);
};

EmployeeService.prototype.retrievePaged = function(successCallback, pageIndex, pageSize, sortOrder, sortColumn, linq) {
    var restUrl = "EmployeeListPage";
    restUrl = restUrl + "/?";

    if (!IsNullOrEmpty(pageIndex)) {
        restUrl = restUrl + "pageIndex=" + pageIndex;
        if (!IsNullOrEmpty(pageSize) || !IsNullOrEmpty(sortOrder) || !IsNullOrEmpty(sortColumn) || !IsNullOrEmpty(linq)) {
            restUrl = restUrl + "&";
        }
    }
    if (!IsNullOrEmpty(pageSize)) {
        restUrl = restUrl + "pageSize=" + pageSize;
        if (!IsNullOrEmpty(sortOrder) || !IsNullOrEmpty(sortColumn) || !IsNullOrEmpty(linq)) {
            restUrl = restUrl + "&";
        }
    }
    if (!IsNullOrEmpty(sortOrder)) {
        restUrl = restUrl + "sortOrder=" + sortOrder;
        if (!IsNullOrEmpty(sortColumn) || !IsNullOrEmpty(linq)) {
            restUrl = restUrl + "&";
        }
    }
    if (!IsNullOrEmpty(sortColumn)) {
        restUrl = restUrl + "sortColumn=" + sortColumn;
        if (!IsNullOrEmpty(linq)) {
            restUrl = restUrl + "&";
        }
    }
    restUrl = restUrl + "linq=" + linq;

    viewServiceProxy.invokeGet(restUrl, successCallback, OnPageError, true);
};

EmployeeService.prototype.save = function(employee, successCallback) {
viewServiceProxy.invokePut("Employee", employee.getEmployeeObject(), successCallback, OnPageError, true);
};
